<?php

namespace Blog\PostBundle\Entity;

/**
 * @orm:Entity
 * @orm:Table(name="categorie")
 */
class Categorie {
    /**
     *
     * @orm:ID
     * @orm:Column(type="integer")
     * @orm:GeneratedValue(strategy="AUTO")
     */
    protected  $id_categorie;

    /**
     *
     * @orm:Column(type="string", length="100")
     */
    protected $nom_categorie;

    /**
     * @orm:OneToOne(targetEntity="Categorie")
     * @orm:JoinColumn(name="parent", referencedColumnName="id_categorie")
     */
    protected $parent;

    /**
     * @orm:OneToMany(targetEntity="Post", mappedBy="categorie")
     */
    protected $posts;

    /**
     *
     * @orm:ManyToOne(targetEntity="Labo", inversedBy="categories")
     * @orm:JoinColumn(name="labo", referencedColumnName="id_labo")
     */
    protected $labo;

    function __construct(){
       $this->posts = new \Doctrine\Common\Collections\ArrayCollection();

    }


    public function getId_categorie() {
        return $this->id_categorie;
    }

    public function getNom_categorie() {
        return $this->nom_categorie;
    }

    public function setNom_categorie($nom_categorie) {
        $this->nom_categorie = $nom_categorie;
    }

    public function getParent() {
        return $this->parent;
    }

    public function setParent($parent) {
        $this->parent = $parent;
    }

    public function getPosts() {
        return $this->posts;
    }

    public function setPosts($posts) {
        $this->posts = $posts;
    }

    public function getLabo() {
        return $this->labo;
    }

    public function setLabo($labo) {
        $this->labo = $labo;
    }


}

?>
